3.1.75 \(\int \frac {(e x)^m (a c-b c x)^2}{a+b x} \, dx\) [75]

Optimal. Leaf size=78 \[ -\frac {3 a c^2 (e x)^{1+m}}{e (1+m)}+\frac {b c^2 (e x)^{2+m}}{e^2 (2+m)}+\frac {4 a c^2 (e x)^{1+m} \, _2F_1\left (1,1+m;2+m;-\frac {b x}{a}\right )}{e (1+m)} \]

[Out]

-3*a*c^2*(e*x)^(1+m)/e/(1+m)+b*c^2*(e*x)^(2+m)/e^2/(2+m)+4*a*c^2*(e*x)^(1+m)*hypergeom([1, 1+m],[2+m],-b*x/a)/
e/(1+m)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {90, 66, 45} \begin {gather*} \frac {4 a c^2 (e x)^{m+1} \, _2F_1\left (1,m+1;m+2;-\frac {b x}{a}\right )}{e (m+1)}-\frac {3 a c^2 (e x)^{m+1}}{e (m+1)}+\frac {b c^2 (e x)^{m+2}}{e^2 (m+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((e*x)^m*(a*c - b*c*x)^2)/(a + b*x),x]

[Out]

(-3*a*c^2*(e*x)^(1 + m))/(e*(1 + m)) + (b*c^2*(e*x)^(2 + m))/(e^2*(2 + m)) + (4*a*c^2*(e*x)^(1 + m)*Hypergeome
tric2F1[1, 1 + m, 2 + m, -((b*x)/a)])/(e*(1 + m))

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 66

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x)^(m + 1)/(b*(m + 1)))*Hypergeometr
ic2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m] && (IntegerQ[n] || (GtQ[
c, 0] &&  !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rubi steps

\begin {align*} \int \frac {(e x)^m (a c-b c x)^2}{a+b x} \, dx &=\int \left (-2 a c^2 (e x)^m+\frac {4 a^2 c^2 (e x)^m}{a+b x}-c (e x)^m (a c-b c x)\right ) \, dx\\ &=-\frac {2 a c^2 (e x)^{1+m}}{e (1+m)}-c \int (e x)^m (a c-b c x) \, dx+\left (4 a^2 c^2\right ) \int \frac {(e x)^m}{a+b x} \, dx\\ &=-\frac {2 a c^2 (e x)^{1+m}}{e (1+m)}+\frac {4 a c^2 (e x)^{1+m} \, _2F_1\left (1,1+m;2+m;-\frac {b x}{a}\right )}{e (1+m)}-c \int \left (a c (e x)^m-\frac {b c (e x)^{1+m}}{e}\right ) \, dx\\ &=-\frac {3 a c^2 (e x)^{1+m}}{e (1+m)}+\frac {b c^2 (e x)^{2+m}}{e^2 (2+m)}+\frac {4 a c^2 (e x)^{1+m} \, _2F_1\left (1,1+m;2+m;-\frac {b x}{a}\right )}{e (1+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 54, normalized size = 0.69 \begin {gather*} \frac {c^2 x (e x)^m \left (-3 a (2+m)+b (1+m) x+4 a (2+m) \, _2F_1\left (1,1+m;2+m;-\frac {b x}{a}\right )\right )}{(1+m) (2+m)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((e*x)^m*(a*c - b*c*x)^2)/(a + b*x),x]

[Out]

(c^2*x*(e*x)^m*(-3*a*(2 + m) + b*(1 + m)*x + 4*a*(2 + m)*Hypergeometric2F1[1, 1 + m, 2 + m, -((b*x)/a)]))/((1
+ m)*(2 + m))

________________________________________________________________________________________

Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \frac {\left (e x \right )^{m} \left (-b c x +a c \right )^{2}}{b x +a}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^m*(-b*c*x+a*c)^2/(b*x+a),x)

[Out]

int((e*x)^m*(-b*c*x+a*c)^2/(b*x+a),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^m*(-b*c*x+a*c)^2/(b*x+a),x, algorithm="maxima")

[Out]

integrate((b*c*x - a*c)^2*(x*e)^m/(b*x + a), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^m*(-b*c*x+a*c)^2/(b*x+a),x, algorithm="fricas")

[Out]

integral((b^2*c^2*x^2 - 2*a*b*c^2*x + a^2*c^2)*(x*e)^m/(b*x + a), x)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 1.92, size = 246, normalized size = 3.15 \begin {gather*} \frac {a c^{2} e^{m} m x x^{m} \Phi \left (\frac {b x e^{i \pi }}{a}, 1, m + 1\right ) \Gamma \left (m + 1\right )}{\Gamma \left (m + 2\right )} + \frac {a c^{2} e^{m} x x^{m} \Phi \left (\frac {b x e^{i \pi }}{a}, 1, m + 1\right ) \Gamma \left (m + 1\right )}{\Gamma \left (m + 2\right )} - \frac {2 b c^{2} e^{m} m x^{2} x^{m} \Phi \left (\frac {b x e^{i \pi }}{a}, 1, m + 2\right ) \Gamma \left (m + 2\right )}{\Gamma \left (m + 3\right )} - \frac {4 b c^{2} e^{m} x^{2} x^{m} \Phi \left (\frac {b x e^{i \pi }}{a}, 1, m + 2\right ) \Gamma \left (m + 2\right )}{\Gamma \left (m + 3\right )} + \frac {b^{2} c^{2} e^{m} m x^{3} x^{m} \Phi \left (\frac {b x e^{i \pi }}{a}, 1, m + 3\right ) \Gamma \left (m + 3\right )}{a \Gamma \left (m + 4\right )} + \frac {3 b^{2} c^{2} e^{m} x^{3} x^{m} \Phi \left (\frac {b x e^{i \pi }}{a}, 1, m + 3\right ) \Gamma \left (m + 3\right )}{a \Gamma \left (m + 4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**m*(-b*c*x+a*c)**2/(b*x+a),x)

[Out]

a*c**2*e**m*m*x*x**m*lerchphi(b*x*exp_polar(I*pi)/a, 1, m + 1)*gamma(m + 1)/gamma(m + 2) + a*c**2*e**m*x*x**m*
lerchphi(b*x*exp_polar(I*pi)/a, 1, m + 1)*gamma(m + 1)/gamma(m + 2) - 2*b*c**2*e**m*m*x**2*x**m*lerchphi(b*x*e
xp_polar(I*pi)/a, 1, m + 2)*gamma(m + 2)/gamma(m + 3) - 4*b*c**2*e**m*x**2*x**m*lerchphi(b*x*exp_polar(I*pi)/a
, 1, m + 2)*gamma(m + 2)/gamma(m + 3) + b**2*c**2*e**m*m*x**3*x**m*lerchphi(b*x*exp_polar(I*pi)/a, 1, m + 3)*g
amma(m + 3)/(a*gamma(m + 4)) + 3*b**2*c**2*e**m*x**3*x**m*lerchphi(b*x*exp_polar(I*pi)/a, 1, m + 3)*gamma(m +
3)/(a*gamma(m + 4))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^m*(-b*c*x+a*c)^2/(b*x+a),x, algorithm="giac")

[Out]

integrate((b*c*x - a*c)^2*(x*e)^m/(b*x + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a\,c-b\,c\,x\right )}^2\,{\left (e\,x\right )}^m}{a+b\,x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a*c - b*c*x)^2*(e*x)^m)/(a + b*x),x)

[Out]

int(((a*c - b*c*x)^2*(e*x)^m)/(a + b*x), x)

________________________________________________________________________________________